<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <title>webrx</title>
    <script src="https://unpkg.com/axios"></script>
</head>
<body>
<h3></h3>
<script>
    let tt = document.querySelectorAll('h3')[0]

    //axios.get('api.php').then(res => tt.innerHTML = res.data.msg).catch(err => console.log(err))
    function ttss() {
        axios.get('http://localhost/tt.php')
            .then(res => {
                tt.innerHTML = res.data
            })
            .catch(err => console.log(err))
    }

    ttss()
    setInterval(ttss, 1000)
</script>
</body>
</html>